#ifndef _AMERICO_TIME_MANAGER_H_
#define _AMERICO_TIME_MANAGER_H_

#include <vector>
#include "ctime.h"

namespace Clock
{
	class Timer;
	class SystemTimer;

	class TimeManager
	{
	public:
		TimeManager();
		~TimeManager();

		void InitDefaults();

		void CreateTimer(const Clocks &aTimer);
		bool AttachTimerToTimer(const Clocks &aTimerToAttach);
		bool AttachTimerToTimer(const Clocks &aTimerToAttach, const Clocks &aTimerToAttachTo);

		Time GetElapsedTime() const;
		Time GetTotalTime() const;

		Time GetElapsedTime(const Clocks &aTimer) const;
		Time GetTotalTime(const Clocks &aTimer) const;
		bool SetClockPauseState(const Clocks &aTimer,const bool &aPauseState);
		bool GetClockPauseState(const Clocks &aTimer) const;

		void SetCurrentDefaultClock(const Clocks &aTimer);

		void Update();

	private:
		Clocks myDefaultClock;
		std::vector<Timer*> myClocks;
		SystemTimer *mySystemClock;
	};
};

#endif
